package com.kjzy.service.impl;

import com.kjzy.dao.UserDao;
import com.kjzy.pojo.User;
import com.kjzy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
//    查询所有用户信息
    @Override
    public List<User> getAllUsers() {
        return userDao.getAllUsers();
    }
//通过id查询用户信息
    @Override
    public User getUser(int id) {
        return userDao.getUser(id);
    }

}
